package com.example.springbootdemo;


import org.slf4j.Logger;
import org.slf4j.LoggerFactory;
import org.springframework.beans.factory.annotation.Value;
import org.springframework.stereotype.Controller;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.ResponseBody;
import org.springframework.web.bind.annotation.RestController;

@RestController
@ResponseBody
public class TestController {


    private static final  Logger logger =
            LoggerFactory.getLogger(TestController.class);


    @Value("${javaclass}")
    private String myconfig;


    @RequestMapping("/sayHi")//==@WebServlet("url")
    public String sayHi(){
        logger.info("--------输出日志---------");
        return "hello world -> "+ myconfig;

    }






}
